package com.gec.service.impl;

import com.gec.dao.EmployeeDao;
import com.gec.dao.impl.EmployeeDaoImpl;
import com.gec.domain.Employee;
import com.gec.service.EmployeeService;
import com.gec.utils.PageModel;

import java.util.List;

public class EmployeeServletImpl implements EmployeeService {
    EmployeeDao dao=new EmployeeDaoImpl();
    //添加
    @Override
    public void addEmployee(Employee employee) {
        dao.addEmployee(employee);
    }

    //删除
    @Override
    public void deleteEmployee(int id) {
        dao.deleteEmployee(id);
    }

    //修改
    @Override
    public void updateEmployee(Employee employee) {
        dao.updateEmployee(employee);
    }


    //查询
    @Override
    public List<Employee> findAllemployees(Employee employee, PageModel model) {
        return dao.findAllemployees(employee,model);
    }

    @Override
    public int getTotalEmployeeCount(Employee employee) {
        return dao.getTotalEmployeeCount(employee);
    }

    @Override
    public Employee findById(int id) {
        return dao.findById(id);
    }


}
